package com.epam.javalab.giorgadze.task2.runner;

import com.epam.javalab.giorgadze.task2.entity.Paragraph;
import com.epam.javalab.giorgadze.task2.logic.Parser;
import com.epam.javalab.giorgadze.task2.logic.Reader;

import java.io.IOException;

import static com.epam.javalab.giorgadze.task2.logic.TextWorker.switchFirstAndLastWords;

/**
 * User: Luka
 * Date: 23.02.14
 * Time: 15:27
 */
public class Runner {
    public static void main(String[] args) throws IOException {
        String s = Reader.readTextFromFile("text.txt");
        Parser parser = new Parser();
        //  System.out.println(parser.parseParagraphsToSentences(s));
        Paragraph p = switchFirstAndLastWords(s);
        System.out.println(p);
        System.out.println(parser.parseParagraphsToSentences(s));
    }
}
